﻿namespace Fast.NormalizeActionResult
{
    /// <summary>
    /// 异常元数据
    /// </summary>
    [SkipScan]
    public sealed class ExceptionMetadata
    {
        /// <summary>
        /// 响应码
        /// </summary>
        public string Code { get; internal set; }

        /// <summary>
        /// 响应消息
        /// </summary>
        public string Message { get; internal set; }

        /// <summary>
        /// 模型验证错误信息
        /// </summary>
        public ValidationErrorInfo[] ValidationErrors { get; internal set; }

        /// <summary>
        /// 
        /// </summary>
        public ExceptionMetadata()
        {

        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="message"></param>
        /// <param name="code"></param>
        public ExceptionMetadata(string message, string code = null)
        {
            Message = message;
            Code = code;
        }
    }
}
